﻿namespace 泛型约束
{
    //抽象基类，通常保有主键，审计属性等字段
    public abstract class BaseModle
    {
        public string Id { get; set; }
        public string CreateTime { get; set; }
        public string UpdateTime { get; set; }

        /// <summary>
        /// 审核
        /// </summary>
        public bool Check { get; set; }
    }

    public class Model1 : BaseModle
    {
        public string Name { get; set; }
    }

    public interface BaseInterface
    {
        string Id { get; set; }

        public void CW1();
    }

    public class Model2 : BaseInterface
    {
        public string Id { get; set; }
        public void CW1()
        {
            Console.WriteLine(1);
        }
    }
}